
#pragma once

#include <deque>

#include "client_socket.h"

namespace sock {

	class TextSocket : public ClientSocket {
	public:
		explicit TextSocket( RawSocket & other );
		explicit TextSocket( ClientSocket & other );
		void readln( std::string * pstring );
		bool writeln( const std::string & string );
		int read( void* buf, int len );
	private:
		
		TextSocket( const TextSocket &other );
		TextSocket & operator=( const TextSocket &other );
		
		void feed_buf();

		std::deque<char> _buf;
	};

}